cmake_minimum_required(VERSION 3.16)
project(OnnxWrapTestForOpenVINO)

# windows
set(OpenCV_DIR D:/Development/Envs/OpenCV460/Binary/x64/vc16/lib)

set(XTENSOR_USE_XSIMD ON)
set(xtl_DIR D:/Development/Envs/xtensorlib/xtlBin/share/cmake/xtl)
set(xsimd_DIR D:/Development/Envs/xtensorlib/xsimdBin/share/cmake/xsimd)
set(xtensor_DIR D:/Development/Envs/xtensorlib/xtensorBin/share/cmake/xtensor)

set(onnxruntime_DIR D:/Development/Envs/Microsoft.ML.OnnxRuntime.OpenVino.1.20.0)
set(onnxruntime_INCLUDE ${onnxruntime_DIR}/include)
set(onnxruntime_LIBS
    ${onnxruntime_DIR}/lib/onnxruntime.lib
)


add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

find_package(OpenCV REQUIRED)
find_package(xtensor REQUIRED)

add_executable(${PROJECT_NAME}
        main.cpp
        UNetOnnx.h UNetOnnx.cpp
)

target_link_libraries(${PROJECT_NAME}
        ${OpenCV_LIBS}
        xtensor
        ${onnxruntime_LIBS}
)
target_include_directories(${PROJECT_NAME}
    PUBLIC
        ${OpenCV_INCLUDE_DIRS}
        ${onnxruntime_INCLUDE}
)